using System.Collections;

namespace EnsoDeveloperExtension
{
    public abstract class EnsoCommand : IEnsoCommand
    {
        public abstract string Name { get; }

        public abstract string Description { get; }

        public abstract string Help { get; }

        public virtual string PostfixType
        {
            get { return "none"; }
        }

        public abstract void Call(string postfix);

        protected void DisplayMessage(string text)
        {
            EnsoExtensionManager.Instance.DisplayMessage(text);
        }

        protected ArrayList GetFileSelection()
        {
            return EnsoExtensionManager.Instance.GetFileSelection();
        }

        protected string GetUniCodeSelection()
        {
            return EnsoExtensionManager.Instance.GetUnicodeSelection();
        }

        protected void InsertUnicodeAtCursor(string text)
        {
            EnsoExtensionManager.Instance.InsertUnicodeAtCursor(text, Name);    
        }

        protected void SetUnicodeSelection(string text)
        {
            EnsoExtensionManager.Instance.SetUnicodeSelection(text, Name);
        }
    }
}
